package cn.alm.springmvcrestfulcrud.entity;

import jakarta.validation.constraints.*;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
public class Employee {

    private Integer id;

//    @NotBlank(message = "姓名不能为空")
    private String name;

//    @NotNull(message = "年龄不能为空")
//    @Max(value = 120, message = "年龄不能大于120")
//    @Min(value = 0, message = "年龄不能小于0")
    private Integer age;

//    @Email(message = "邮箱格式不正确")
    private String email;

    // 性别只能为：男、女
//    @Pattern(regexp = "^(男|女)$", message = "性别只能为：男、女")
//    private String gender;

//    @Gender
    private String gender;

    private String address;
    private BigDecimal salary;
    private Date birthday;

}
